<template>
	<view class="">
		<view class="top_box">
			<image src="/static/images/fanhui.png" mode="" @click="gotoLunBo"></image>
			<view class="top">
			
				<input type="text" value="" placeholder="22222222"/>
			</view><!-- top -->
		</view><!-- top_box -->
		
		<view class="menu_box">
			<view class="submenu" v-for="(item,sub) in submenu" :key="sub">
				<image :src="item.image" mode=""></image>
				<view class="text">{{item.title}}</view>
				<view class="texta">{{item.titleone}}</view>
			</view><!-- submenu -->
		</view><!-- menu_box -->
	</view>
	
	
</template>

<script>
	
	export default {
		data() {
			return {
				
				submenu: [{
						image: "/static/images/nf.jpg",
						title: '新一代扫地机器人',
						titleone: '268积分'
					},
					{
						image: "/static/images/sg.jpg",
						title: '小U暖风机',
						titleone: '90积分'
					},
					{
						image: "/static/images/sg.jpg",
						title: '家具生活',
						titleone: 'aaa'
					},
					{
						image: "/static/images/sg.jpg",
						title: '零食玩具',
						titleone: 'aaa'
					},
					{
						image: "/static/images/sg.jpg",
						title: '零食玩具',
						titleone: 'aaa'
					},
						
						{
							image: "/static/images/sg.jpg",
							title: '零食玩具',
							titleone: 'aaa'
						},
							
	
				]
			}
		},
		onLoad() {
	
		},
		methods: {
			gotoLunBo() {
				//        
				uni.switchTab({
					url: 'cart'
				})
			}
		},
	}
	
</script>

<style lang="scss">
	
	.menu_box{
		justify-content: space-around;
		display: flex;
		width: 95%;
		margin: 0 auto;
		background: #F6F6F6;
		flex-wrap: wrap;
		
		
		
		.submenu {
			justify-content: space-around;
			width: 45%;
			margin-top: 30rpx;
			border-radius: 15rpx;
		background: white;
		
			image {
				width: 100%;
				// margin:0 auto;
		
			}
		
			.text {
				padding: 10rpx 0;
				padding-left: 20rpx;
				font-weight: 600;
			}
		
			.texta {
				color: red;
				font-weight: 600;
				padding-left: 20rpx;
				padding-bottom: 20rpx;
			}
		}
		
		
		
		
	}
	.top_box{
		image{width:50rpx;height:50rpx;margin:25rpx 10rpx;
		float: left;
		}
		.top{
			width:80%;
			margin:20rpx;
			float: left;
			border-radius: 40rpx;
			background-color: #F2F2F2;
			background: url(../../static/images/fangdajing.png)10rpx no-repeat;
			background-color: #F2F2F2;
			background-size:40rpx;
			text-indent: 60rpx;
			input{
				height: 60rpx;
				line-height: 60rpx;
			}
		}
	}
		
	
</style>
